import requests
import json
# 接口地址
url = 'https://www.zhipin.com/wapi/zpgeek/search/joblist.json?scene=1&query=&city=101230200&experience=&payType=&partTime=&degree=&industry=&scale=&stage=&position=&jobType=&salary=&multiBusinessDistrict=&multiSubway=&page=1&pageSize=30'

cookie_str = ""
# 读取本地json文件
with open('boss直聘.json', 'r', encoding='utf-8') as file:
    cookie_data = json.load(file)
    print(type(cookie_data))
    # cookie_str = '; '.join([f'{key}={value}' for key, value in cookie_data.items()])
    print(cookie_str)

# 请求参数
# params = {
#     'city': '101280100',
#     'query': '',
#     'page': 1,
#     'cookie': cookie_str
# }
# response = requests.get(url, params=params)
# data = response.json()
# print(data)
